﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="get_word.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Lesson.get_word" %>

<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <table id="word_space" class="volca-table w3-table w3-striped w3-white">
        <thead>
            <tr class="w3-blue">
                <th>Mục từ</th>
                <th>Hán Tự</th>
                <th>Âm Hán</th>
                <th>Nghĩa</th>
                <th>Phát âm</th>
                <th>Chọn</th>
            </tr>
            <tr class="w3-light-grey">
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <th class="w3-text-blue"><i onclick="speak_all()" title="Nghe tất cả" class="fa fa-play word-speak-all-btn w3-btn w3-blue w3-hover-white w3-hover-text-blue"></i></th>
                <td>&nbsp;</td>
            </tr>
        </thead>
        <tbody id="sortable">
            <%foreach (TblLessonWord word in new TblLessonWordController().FetchAll().Where(x => x.LessonId == this.id))
              { %>
            <tr id="word_row<%=word.WordId %>" class="word_row ui-state-default">
                <td class="w3-hide word_id"><%=word.WordId %></td>
                <td class="word_content"><%=word.WordName %></td>
                <td class="word_content"><%=word.WordChinese %></td>
                <td class="word_content"><%=word.WordChineseMean %></td>
                <td class="word_content"><%=word.WordVietNamMean %></td>
                <%if(word.WordType==""){ %>
                <td>
                    <span class="word-speak-link w3-hide"></span>
                    <i title="Không có file âm thanh" class="fa fa-volume-up word-speak-btn w3-grey"></i>
                </td>
                <%}else{ %>
                <td class="word-speak-item">
                    <span class="word-speak-link w3-hide"><%=word.WordType %></span>
                    <i onclick="speak_one(this),pause_speak_all(this)" title="Nghe cách phát âm" class="fa fa-volume-up word-speak-btn w3-btn w3-blue w3-hover-white w3-hover-text-blue"></i>&nbsp;
                    <i onclick="speak_all()" title="Dừng nghe tất cả" class="fa fa-play word-speak-all-btn inline-speak-all-btn w3-btn w3-blue w3-hover-white w3-hover-text-blue"></i>
                </td>
                <%} %>
                <td class="checkbox">
                    <input type="checkbox" name="xoa" class="del_word" id="word<%=word.WordId %>" /><label for="word<%=word.WordId %>"></label></td>
            </tr>

            <%} %>
        </tbody>
    </table>

</body>
</html>
